﻿namespace MSSqlSchemaDoc.Core.DataStructures
{
    using System;
    using System.Xml.Serialization;

    /// <summary>
    /// Represents a trigger on a table or a view.
    /// </summary>
    [Serializable()]
    public class DmlTrigger : TriggerBase
    {
        /// <summary>
        /// Gets the DML trigger object type string.
        /// </summary>
        public override DataStructureObjectType ObjectType
        {
            get
            {
                return DataStructureObjectType.DmlTrigger;
            }
        }

        /// <summary>
        /// Gets or sets a value indicating whether the trigger fires "INSTEAD OF" the normal operation, or "AFTER" the operation.
        /// </summary>
        [XmlElement()]
        public bool IsInsteadOf { get; set; }
    }
}
